
% -------------------------------------------------------------------------
% 计算两脉冲霍曼变轨
%
% Copyright(C) 2016/09/29 by Chen Zhang,
% Tsinghua Space Center
% chenzhang.buaa@gmail.com
% -------------------------------------------------------------------------
function [dv1 , dv2] = hohmann(alti , altf , aux)
mu = aux.mu;
req = aux.req;

r1 = req + alti;
r2 = req + altf;

% compute "local circular velocity" of initial and final orbits
vi = sqrt(mu / r1);
vf = sqrt(mu / r2);

% compute per1gee and apogee velocities of the transfer orbit
vti = sqrt(2 * mu * r2 / (r1 * (r1 + r2)));
vtf = sqrt(2 * mu * r1 / (r2 * (r1 + r2)));

% coplanar orbit transfer
dv1 = vti - vi;
dv2 = vf - vtf;

% sma = (r1 + r2) / 2;
% T = pi * sqrt(sma^3 / mu);

end
% -------------------------------------------------------------------------